3.57 \(\int \frac {A+B x+C x^2}{(a+b x) \sqrt {c+d x} \sqrt {e+f x}} \, dx\)

Optimal. Leaf size=188 \[ -\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d x} \sqrt {b e-a f}}{\sqrt {e+f x} \sqrt {b c-a d}}\right )}{b^2 \sqrt {b c-a d} \sqrt {b e-a f}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d} \sqrt {e+f x}}\right ) (2 a C d f+b (-2 B d f+c C f+C d e))}{b^2 d^{3/2} f^{3/2}}+\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f} \]

[Out]

-(2*a*C*d*f+b*(-2*B*d*f+C*c*f+C*d*e))*arctanh(f^(1/2)*(d*x+c)^(1/2)/d^(1/2)/(f*x+e)^(1/2))/b^2/d^(3/2)/f^(3/2)
-2*(A*b^2-a*(B*b-C*a))*arctanh((-a*f+b*e)^(1/2)*(d*x+c)^(1/2)/(-a*d+b*c)^(1/2)/(f*x+e)^(1/2))/b^2/(-a*d+b*c)^(
1/2)/(-a*f+b*e)^(1/2)+C*(d*x+c)^(1/2)*(f*x+e)^(1/2)/b/d/f

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 188, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {1615, 157, 63, 217, 206, 93, 208} \[ -\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d x} \sqrt {b e-a f}}{\sqrt {e+f x} \sqrt {b c-a d}}\right )}{b^2 \sqrt {b c-a d} \sqrt {b e-a f}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d} \sqrt {e+f x}}\right ) (2 a C d f+b (-2 B d f+c C f+C d e))}{b^2 d^{3/2} f^{3/2}}+\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x + C*x^2)/((a + b*x)*Sqrt[c + d*x]*Sqrt[e + f*x]),x]

[Out]

(C*Sqrt[c + d*x]*Sqrt[e + f*x])/(b*d*f) - ((2*a*C*d*f + b*(C*d*e + c*C*f - 2*B*d*f))*ArcTanh[(Sqrt[f]*Sqrt[c +
 d*x])/(Sqrt[d]*Sqrt[e + f*x])])/(b^2*d^(3/2)*f^(3/2)) - (2*(A*b^2 - a*(b*B - a*C))*ArcTanh[(Sqrt[b*e - a*f]*S
qrt[c + d*x])/(Sqrt[b*c - a*d]*Sqrt[e + f*x])])/(b^2*Sqrt[b*c - a*d]*Sqrt[b*e - a*f])

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 157

Int[(((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/((a_.) + (b_.)*(x_)), x_Symbol]
 :> Dist[h/b, Int[(c + d*x)^n*(e + f*x)^p, x], x] + Dist[(b*g - a*h)/b, Int[((c + d*x)^n*(e + f*x)^p)/(a + b*x
), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 1615

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> With[
{q = Expon[Px, x], k = Coeff[Px, x, Expon[Px, x]]}, Simp[(k*(a + b*x)^(m + q - 1)*(c + d*x)^(n + 1)*(e + f*x)^
(p + 1))/(d*f*b^(q - 1)*(m + n + p + q + 1)), x] + Dist[1/(d*f*b^q*(m + n + p + q + 1)), Int[(a + b*x)^m*(c +
d*x)^n*(e + f*x)^p*ExpandToSum[d*f*b^q*(m + n + p + q + 1)*Px - d*f*k*(m + n + p + q + 1)*(a + b*x)^q + k*(a +
 b*x)^(q - 2)*(a^2*d*f*(m + n + p + q + 1) - b*(b*c*e*(m + q - 1) + a*(d*e*(n + 1) + c*f*(p + 1))) + b*(a*d*f*
(2*(m + q) + n + p) - b*(d*e*(m + q + n) + c*f*(m + q + p)))*x), x], x], x] /; NeQ[m + n + p + q + 1, 0]] /; F
reeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && IntegersQ[2*m, 2*n, 2*p]

Rubi steps

\begin {align*} \int \frac {A+B x+C x^2}{(a+b x) \sqrt {c+d x} \sqrt {e+f x}} \, dx &=\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f}+\frac {\int \frac {\frac {1}{2} b (2 A b d f-a C (d e+c f))-\frac {1}{2} b (2 a C d f+b (C d e+c C f-2 B d f)) x}{(a+b x) \sqrt {c+d x} \sqrt {e+f x}} \, dx}{b^2 d f}\\ &=\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f}+\left (A-\frac {a (b B-a C)}{b^2}\right ) \int \frac {1}{(a+b x) \sqrt {c+d x} \sqrt {e+f x}} \, dx+\frac {(-2 a C d f-b (C d e+c C f-2 B d f)) \int \frac {1}{\sqrt {c+d x} \sqrt {e+f x}} \, dx}{2 b^2 d f}\\ &=\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f}+\left (2 \left (A-\frac {a (b B-a C)}{b^2}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-b c+a d-(-b e+a f) x^2} \, dx,x,\frac {\sqrt {c+d x}}{\sqrt {e+f x}}\right )+\frac {(-2 a C d f-b (C d e+c C f-2 B d f)) \operatorname {Subst}\left (\int \frac {1}{\sqrt {e-\frac {c f}{d}+\frac {f x^2}{d}}} \, dx,x,\sqrt {c+d x}\right )}{b^2 d^2 f}\\ &=\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f}-\frac {2 \left (A-\frac {a (b B-a C)}{b^2}\right ) \tanh ^{-1}\left (\frac {\sqrt {b e-a f} \sqrt {c+d x}}{\sqrt {b c-a d} \sqrt {e+f x}}\right )}{\sqrt {b c-a d} \sqrt {b e-a f}}+\frac {(-2 a C d f-b (C d e+c C f-2 B d f)) \operatorname {Subst}\left (\int \frac {1}{1-\frac {f x^2}{d}} \, dx,x,\frac {\sqrt {c+d x}}{\sqrt {e+f x}}\right )}{b^2 d^2 f}\\ &=\frac {C \sqrt {c+d x} \sqrt {e+f x}}{b d f}-\frac {(2 a C d f+b (C d e+c C f-2 B d f)) \tanh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d} \sqrt {e+f x}}\right )}{b^2 d^{3/2} f^{3/2}}-\frac {2 \left (A-\frac {a (b B-a C)}{b^2}\right ) \tanh ^{-1}\left (\frac {\sqrt {b e-a f} \sqrt {c+d x}}{\sqrt {b c-a d} \sqrt {e+f x}}\right )}{\sqrt {b c-a d} \sqrt {b e-a f}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.94, size = 304, normalized size = 1.62 \[ \frac {2 \left (\frac {\left (a (a C-b B)+A b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d x} \sqrt {a f-b e}}{\sqrt {e+f x} \sqrt {a d-b c}}\right )}{\sqrt {a d-b c} \sqrt {a f-b e}}-\frac {\sqrt {e+f x} (a C f-b B f+b C e) \sinh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d e-c f}}\right )}{f^{3/2} \sqrt {d e-c f} \sqrt {\frac {d (e+f x)}{d e-c f}}}+\frac {b C \sqrt {e+f x} \left (\sqrt {f} \sqrt {c+d x} \sqrt {\frac {d (e+f x)}{d e-c f}}+\sqrt {d e-c f} \sinh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d e-c f}}\right )\right )}{2 d f^{3/2} \sqrt {\frac {d (e+f x)}{d e-c f}}}\right )}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x + C*x^2)/((a + b*x)*Sqrt[c + d*x]*Sqrt[e + f*x]),x]

[Out]

(2*(-(((b*C*e - b*B*f + a*C*f)*Sqrt[e + f*x]*ArcSinh[(Sqrt[f]*Sqrt[c + d*x])/Sqrt[d*e - c*f]])/(f^(3/2)*Sqrt[d
*e - c*f]*Sqrt[(d*(e + f*x))/(d*e - c*f)])) + (b*C*Sqrt[e + f*x]*(Sqrt[f]*Sqrt[c + d*x]*Sqrt[(d*(e + f*x))/(d*
e - c*f)] + Sqrt[d*e - c*f]*ArcSinh[(Sqrt[f]*Sqrt[c + d*x])/Sqrt[d*e - c*f]]))/(2*d*f^(3/2)*Sqrt[(d*(e + f*x))
/(d*e - c*f)]) + ((A*b^2 + a*(-(b*B) + a*C))*ArcTanh[(Sqrt[-(b*e) + a*f]*Sqrt[c + d*x])/(Sqrt[-(b*c) + a*d]*Sq
rt[e + f*x])])/(Sqrt[-(b*c) + a*d]*Sqrt[-(b*e) + a*f])))/b^2

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/(b*x+a)/(d*x+c)^(1/2)/(f*x+e)^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/(b*x+a)/(d*x+c)^(1/2)/(f*x+e)^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:

________________________________________________________________________________________

maple [B]  time = 0.03, size = 746, normalized size = 3.97 \[ -\frac {\left (2 \sqrt {d f}\, A \,b^{2} d f \ln \left (\frac {-2 a d f x +b c f x +b d e x -a c f -a d e +2 b c e +2 \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b}{b x +a}\right )-2 \sqrt {d f}\, B a b d f \ln \left (\frac {-2 a d f x +b c f x +b d e x -a c f -a d e +2 b c e +2 \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b}{b x +a}\right )-2 \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, B \,b^{2} d f \ln \left (\frac {2 d f x +c f +d e +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}}{2 \sqrt {d f}}\right )+2 \sqrt {d f}\, C \,a^{2} d f \ln \left (\frac {-2 a d f x +b c f x +b d e x -a c f -a d e +2 b c e +2 \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b}{b x +a}\right )+2 \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, C a b d f \ln \left (\frac {2 d f x +c f +d e +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}}{2 \sqrt {d f}}\right )+\sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, C \,b^{2} c f \ln \left (\frac {2 d f x +c f +d e +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}}{2 \sqrt {d f}}\right )+\sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, C \,b^{2} d e \ln \left (\frac {2 d f x +c f +d e +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}}{2 \sqrt {d f}}\right )-2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}\, \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, C \,b^{2}\right ) \sqrt {f x +e}\, \sqrt {d x +c}}{2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}\, \sqrt {\frac {a^{2} d f -a b c f -a b d e +b^{2} c e}{b^{2}}}\, b^{3} d f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((C*x^2+B*x+A)/(b*x+a)/(d*x+c)^(1/2)/(f*x+e)^(1/2),x)

[Out]

-1/2*(2*A*ln((-2*a*d*f*x+b*c*f*x+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+b^2*c*e)/b^2)^(
1/2))*(f*x+e)^(1/2)*(d*x+c)^(1/2)/((d*x+c)*(f*x+e))^(1/2)/d/(d*f)^(1/2)/b^3/((a^2*d*f-a*b*c*f-a*b*d*e+b^2*c*e)
/b^2)^(1/2)/f

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/(b*x+a)/(d*x+c)^(1/2)/(f*x+e)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(((-(2*a*d*f)/b^2)>0)', see `as
sume?` for more details)Is ((-(2*a*d*f)/b^2)    +(c*f)/b    +(d*e)/b)    ^2    -(4*d*f       *((a^2*d*f)/b^2
      -(a*c*f)/b        -(a*d*e)/b        +c*e))     /b^2 zero or nonzero?

________________________________________________________________________________________

mupad [F(-1)]  time = 0.00, size = -1, normalized size = -0.01 \[ \text {Hanged} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x + C*x^2)/((e + f*x)^(1/2)*(a + b*x)*(c + d*x)^(1/2)),x)

[Out]

\text{Hanged}

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B x + C x^{2}}{\left (a + b x\right ) \sqrt {c + d x} \sqrt {e + f x}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x**2+B*x+A)/(b*x+a)/(d*x+c)**(1/2)/(f*x+e)**(1/2),x)

[Out]

Integral((A + B*x + C*x**2)/((a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)), x)

________________________________________________________________________________________